package org.bit.lesson09;

public class Demo_903 {
    public static void main(String[] args) {
        Student.createStudentByNameAndId("张三", 10);
        Student.createStudentByNameAndClassId("李四", 1);
    }
}

class Student {
    private String name;
    private int age;
    private int id;
    private int classId;

    public static Student createStudentByNameAndId(String name, int id) {
        Student student = new Student();
        student.setName(name);
        student.setId(id);
        return student;
    }

    public static Student createStudentByNameAndClassId(String name, int classId) {
        Student student = new Student();
        student.setName(name);
        student.setId(classId);
        return student;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getClassId() {
        return classId;
    }

    public void setClassId(int classId) {
        this.classId = classId;
    }
}
